package com.coscon.scheduler;


import com.coscon.config.ApplicationStartup;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@Slf4j
public class Scheduler {

    @Resource
    private ApplicationStartup applicationStartup;

    //每隔2秒执行一次
    @Scheduled(fixedRate = 5000)
    public void printAuthCode() {
        applicationStartup.printAuthCode();
    }



}
